from aiogram_dialog import Dialog

from poker_bot.tg_bot.dialogs.admin.withdraws.withdrawals_for_confirmation.handlers import (
    display_withdraw_details,
)
from poker_bot.tg_bot.dialogs.extras import copy_start_data_to_ctx
from poker_bot.tg_bot.dialogs.getters.withdraws import unconfirmed_withdraws_getter
from poker_bot.tg_bot.dialogs.reusable_windows import get_list_window
from poker_bot.tg_bot.states.admin import WithdrawalsForConfirmationSG

withdraws_for_confirmation_dialog = Dialog(
    get_list_window(
        "withdrawals-list-msg",
        "№{item.id} {item.summ} {item.currency_symbol} {item.created_at}",
        "unconfirmed_withdraws",
        WithdrawalsForConfirmationSG.withdrawals_list,
        unconfirmed_withdraws_getter,
        display_withdraw_details,
    ),
    on_start=copy_start_data_to_ctx,
)
